package com.spring.service;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

//@Component
public class Z implements ApplicationContextAware {

	@Autowired
	private A a;

	public Z(){
		System.out.println("Z create");
	}

	@PostConstruct
	public void init(){
		System.out.println("init................");
	}
	@Override
	public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
		System.out.println("call aware callback");
	}
}
